package com.best.member.input.dto;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @ClassName: UserRegisterDTO
 * @Package: com.best.member.input.dto
 * @Description: 会员注册输入实体类
 * @Datetime: 2020/6/22 15:55
 * @Author: nike
 */
@Data
@ApiModel(value = "会员注册输入参数")
public class UserRegisterDTO {
    /**
     * 手机号码
     */

    @NotBlank(message = "手机号码不能为空!")
    @Size(min = 11, max = 11, message = "手机号码长度不正确!")
    @Pattern(
            regexp = "^(((13[0-9])|(14[579])|(15([0-3]|[5-9]))|(16[6])|(17[0135678])|(18[0-9])|(19[89]))\\d{8})$",
            message = "手机号码格式错误!")
    @ApiModelProperty(value = "手机号码")
    private String mobile;
    /**
     * 密码
     */
    @NotBlank(message = "密码不能为空!")
    @ApiModelProperty(value = "密码")
    private String password;

    /**
     * 注册码
     */
    @NotBlank(message = "注册码不能为空!")
    @ApiModelProperty(value = "微信注册码")
    private String registCode;
    /**
     * 图形验证码
     */
    @NotBlank(message = "图形验证码不能为空!")
    @ApiModelProperty(value = "图形验证码")
    private String imageCode;

}
